<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>ES6箭头函数</title>
		<script>
			//1.无参函数
			var js0=function(){
				console.log("js0无参函数调用");
			}
			js0();
			var es60 = () => console.log("es6无参函数调用");
			es60();
			//2.1个参数的函数
			var js1=function(arg){
				return arg;
			}
			console.log(js1("js1含参数函数掉用"))
			var es61 = (arg) => arg;
			console.log(es61("es6含参有返回值函数调用"));
			//3.2个参数函数
			var js2=function(a,b){
				return a+b;
			}
			console.log(js2("js","含参函数调用"))
			var es62 = (x,y)=> x+y;
			console.log(es62("es6","含参函数调用"))
			
		</script>
	</head>
	<body>
	</body>
</html>
